<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="robots" content="noodp" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
        <title>Activiti（一）简介 - 豆是不吃豆豉</title><meta name="Description" content="豆是不吃豆豉"><meta property="og:title" content="Activiti（一）简介" />
<meta property="og:description" content="什么是activiti 是一个以BPMN2.0规范为基准开源的流程引擎框架，将生活中的一些流程抽象成计算机的工作模型，例如 请假审批流程，需要涉" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://dou-chi.gitee.io/activiti%E4%B8%80%E7%AE%80%E4%BB%8B/" />
<meta property="og:image" content="https://dou-chi.gitee.io/logo.png"/>
<meta property="article:published_time" content="2020-11-13T15:49:59+08:00" />
<meta property="article:modified_time" content="2020-11-13T15:49:59+08:00" />
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="https://dou-chi.gitee.io/logo.png"/>

<meta name="twitter:title" content="Activiti（一）简介"/>
<meta name="twitter:description" content="什么是activiti 是一个以BPMN2.0规范为基准开源的流程引擎框架，将生活中的一些流程抽象成计算机的工作模型，例如 请假审批流程，需要涉"/>
<meta name="application-name" content="豆是不吃豆豉">
<meta name="apple-mobile-web-app-title" content="豆是不吃豆豉"><meta name="theme-color" content="#ffffff"><meta name="msapplication-TileColor" content="#da532c"><link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
        <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
        <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"><link rel="manifest" href="/site.webmanifest"><link rel="canonical" href="https://dou-chi.gitee.io/activiti%E4%B8%80%E7%AE%80%E4%BB%8B/" /><link rel="prev" href="https://dou-chi.gitee.io/design-patterns-singleton/" /><link rel="next" href="https://dou-chi.gitee.io/activiti%E4%BA%8C%E5%88%9D%E5%A7%8B%E5%8C%96/" /><link rel="stylesheet" href="/lib/normalize/normalize.min.css"><link rel="stylesheet" href="/css/style.min.css"><link rel="stylesheet" href="/lib/fontawesome-free/all.min.css"><link rel="stylesheet" href="/lib/animate/animate.min.css"><script type="application/ld+json">
    {
        "@context": "http://schema.org",
        "@type": "BlogPosting",
        "headline": "Activiti（一）简介",
        "inLanguage": "zh-CN",
        "mainEntityOfPage": {
            "@type": "WebPage",
            "@id": "https:\/\/dou-chi.gitee.io\/activiti%E4%B8%80%E7%AE%80%E4%BB%8B\/"
        },"genre": "posts","keywords": "Activiti","wordcount":  823 ,
        "url": "https:\/\/dou-chi.gitee.io\/activiti%E4%B8%80%E7%AE%80%E4%BB%8B\/","datePublished": "2020-11-13T15:49:59+08:00","dateModified": "2020-11-13T15:49:59+08:00","publisher": {
            "@type": "Organization",
            "name": ""},"author": {
                "@type": "Person",
                "name": "豆是不吃豆豉"
            },"description": ""
    }
    </script></head>
    <body header-desktop="fixed" header-mobile="auto"><script type="text/javascript">(window.localStorage && localStorage.getItem('theme') ? localStorage.getItem('theme') === 'dark' : ('dark' === 'auto' ? window.matchMedia('(prefers-color-scheme: dark)').matches : 'dark' === 'dark')) && document.body.setAttribute('theme', 'dark');</script>

        <div id="mask"></div><div class="wrapper"><header class="desktop" id="header-desktop">
    <div class="header-wrapper">
        <div class="header-title">
            <a href="/" title="豆是不吃豆豉">豆是不吃豆豉</a>
        </div>
        <div class="menu">
            <div class="menu-inner"><a class="menu-item" href="/posts/"> 所有文章 </a><a class="menu-item" href="/tags/"> 标签 </a><a class="menu-item" href="/categories/"> 分类 </a><a class="menu-item" href="https://github.com/dou-chi" rel="noopener noreffer" target="_blank"> github </a><a class="menu-item" href="https://gitee.com/dou-chi" rel="noopener noreffer" target="_blank"> gitee </a><span class="menu-item delimiter"></span><span class="menu-item search" id="search-desktop">
                        <input type="text" placeholder="搜索文章标题或内容..." id="search-input-desktop">
                        <a href="javascript:void(0);" class="search-button search-toggle" id="search-toggle-desktop" title="搜索">
                            <i class="fas fa-search fa-fw"></i>
                        </a>
                        <a href="javascript:void(0);" class="search-button search-clear" id="search-clear-desktop" title="清空">
                            <i class="fas fa-times-circle fa-fw"></i>
                        </a>
                        <span class="search-button search-loading" id="search-loading-desktop">
                            <i class="fas fa-spinner fa-fw fa-spin"></i>
                        </span>
                    </span><a href="javascript:void(0);" class="menu-item theme-switch" title="切换主题">
                    <i class="fas fa-adjust fa-fw"></i>
                </a>
            </div>
        </div>
    </div>
</header><header class="mobile" id="header-mobile">
    <div class="header-container">
        <div class="header-wrapper">
            <div class="header-title">
                <a href="/" title="豆是不吃豆豉">豆是不吃豆豉</a>
            </div>
            <div class="menu-toggle" id="menu-toggle-mobile">
                <span></span><span></span><span></span>
            </div>
        </div>
        <div class="menu" id="menu-mobile"><div class="search-wrapper">
                    <div class="search mobile" id="search-mobile">
                        <input type="text" placeholder="搜索文章标题或内容..." id="search-input-mobile">
                        <a href="javascript:void(0);" class="search-button search-toggle" id="search-toggle-mobile" title="搜索">
                            <i class="fas fa-search fa-fw"></i>
                        </a>
                        <a href="javascript:void(0);" class="search-button search-clear" id="search-clear-mobile" title="清空">
                            <i class="fas fa-times-circle fa-fw"></i>
                        </a>
                        <span class="search-button search-loading" id="search-loading-mobile">
                            <i class="fas fa-spinner fa-fw fa-spin"></i>
                        </span>
                    </div>
                    <a href="javascript:void(0);" class="search-cancel" id="search-cancel-mobile">
                        取消
                    </a>
                </div><a class="menu-item" href="/posts/" title="">所有文章</a><a class="menu-item" href="/tags/" title="">标签</a><a class="menu-item" href="/categories/" title="">分类</a><a class="menu-item" href="https://github.com/dou-chi" title="" rel="noopener noreffer" target="_blank">github</a><a class="menu-item" href="https://gitee.com/dou-chi" title="" rel="noopener noreffer" target="_blank">gitee</a><a href="javascript:void(0);" class="menu-item theme-switch" title="切换主题">
                <i class="fas fa-adjust fa-fw"></i>
            </a></div>
    </div>
</header>
<div class="search-dropdown desktop">
    <div id="search-dropdown-desktop"></div>
</div>
<div class="search-dropdown mobile">
    <div id="search-dropdown-mobile"></div>
</div>
<main class="main">
                <div class="container"><div class="toc" id="toc-auto">
            <h2 class="toc-title">目录</h2>
            <div class="toc-content always-active" id="toc-content-auto"></div>
        </div><article class="page single"><h1 class="single-title animated flipInX">Activiti（一）简介</h1><div class="post-meta">
            <div class="post-meta-line"><span class="post-author"><a href="/" title="Author" rel=" author" class="author"><i class="fas fa-user-circle fa-fw"></i>豆是不吃豆豉</a></span>&nbsp;<span class="post-category">收录于 <a href="/categories/activiti/"><i class="far fa-folder fa-fw"></i>Activiti</a></span></div>
            <div class="post-meta-line"><i class="far fa-calendar-alt fa-fw"></i>&nbsp;<time datetime="2020-11-13">2020-11-13</time>&nbsp;<i class="fas fa-pencil-alt fa-fw"></i>&nbsp;约 823 字&nbsp;
                <i class="far fa-clock fa-fw"></i>&nbsp;预计阅读 2 分钟&nbsp;</div>
        </div><div class="details toc" id="toc-static"  kept="">
                <div class="details-summary toc-title">
                    <span>目录</span>
                    <span><i class="details-icon fas fa-angle-right"></i></span>
                </div>
                <div class="details-content toc-content" id="toc-content-static"><nav id="TableOfContents">
  <ul>
    <li>
      <ul>
        <li><a href="#什么是activiti">什么是activiti</a></li>
        <li><a href="#bpmn20">BPMN2.0</a></li>
        <li><a href="#activiti-特点">activiti 特点</a>
          <ul>
            <li><a href="#数据持久化">数据持久化</a></li>
            <li><a href="#提供引擎相关service接口">提供引擎相关Service接口</a></li>
            <li><a href="#提供流程设计器">提供流程设计器</a></li>
            <li><a href="#原生支持-spring">原生支持 Spring</a></li>
            <li><a href="#分离运行时于历史数据">分离运行时于历史数据</a></li>
          </ul>
        </li>
        <li><a href="#activit-组件">Activit 组件</a></li>
      </ul>
    </li>
  </ul>
</nav></div>
            </div><div class="content" id="content"><h2 id="什么是activiti">什么是activiti</h2>
<p>是一个以<code>BPMN2.0</code>规范为基准开源的流程引擎框架，将生活中的一些流程抽象成计算机的工作模型，例如 请假审批流程，需要涉及到提交申请，上级审批等环节。那么activiti可以帮助我们记录和触发审批中的各个环节，简化我们的开发。</p>
<h2 id="bpmn20">BPMN2.0</h2>
<p>业务流程模型注解（Business Process Modeling Notation - BPMN）是 业务流程模型的一种标准图形注解。<a href="https://www.cnblogs.com/javaleon/p/4220027.html" target="_blank" rel="noopener noreffer">相关参考说明</a></p>
<h2 id="activiti-特点">activiti 特点</h2>
<h3 id="数据持久化">数据持久化</h3>
<p><code>activiti</code> 持久层使用了<code>MyBatis</code> 并且支持多种数据库 如 Oracle、MySQL、SQL Server、H2\内存数据库等。</p>
<h3 id="提供引擎相关service接口">提供引擎相关Service接口</h3>
<p><code>Activiti</code>提供了七大Service接口，提供了操作流程的各个方法。</p>
<table>
<thead>
<tr>
<th>接口</th>
<th>作用</th>
</tr>
</thead>
<tbody>
<tr>
<td>RepositoryService</td>
<td>流程仓库服务，管理流程仓库，比如部署、删除、读取流程资源</td>
</tr>
<tr>
<td>IdentityService</td>
<td>身份服务，管理用户、组及其关系</td>
</tr>
<tr>
<td>RuntimeService</td>
<td>运行服务，处理所有正在运行态的流程实例、任务等。</td>
</tr>
<tr>
<td>TaskService</td>
<td>任务服务，管理（签收、办理、指派等）、查询任务。</td>
</tr>
<tr>
<td>FormService</td>
<td>表单服务，读取和流程、任务相关的表单数据</td>
</tr>
<tr>
<td>HistoryService</td>
<td>历史服务，管理所有历史数据</td>
</tr>
<tr>
<td>ManagementService</td>
<td>引擎管理服务，和具体业务无关，管理引擎。</td>
</tr>
</tbody>
</table>
<h3 id="提供流程设计器">提供流程设计器</h3>
<p>提供了多种流程设计器</p>
<ul>
<li>Eclipse 插件: Eclipse Designer</li>
<li>基于Web：Activiti Modeler</li>
<li>IDEA 插件：actiBPM (高版本需要离线安装)</li>
</ul>
<h3 id="原生支持-spring">原生支持 Spring</h3>
<p>原生支持Spring,可以轻松和Spring集成。</p>
<h3 id="分离运行时于历史数据">分离运行时于历史数据</h3>
<p>运行时的数据和历史数据分分离，在不同的表中，可以提高存取效率。</p>
<h2 id="activit-组件">Activit 组件</h2>
<p><img
        class="lazyload"
        src="/svg/loading.min.svg"
        data-src="https://b1.sbimg.org/file/chevereto-jia/2020/11/13/GTN4T.png"
        data-srcset="https://b1.sbimg.org/file/chevereto-jia/2020/11/13/GTN4T.png, https://b1.sbimg.org/file/chevereto-jia/2020/11/13/GTN4T.png 1.5x, https://b1.sbimg.org/file/chevereto-jia/2020/11/13/GTN4T.png 2x"
        data-sizes="auto"
        alt="https://b1.sbimg.org/file/chevereto-jia/2020/11/13/GTN4T.png"
        title="架构图" /></p>
<ul>
<li>Activiti Engine: 核心模块，提供BPMN2.0解析、执行、创建查询等。</li>
<li>Activiti Modeler： 流程设计器，将业务转换成流程图。</li>
<li>Activiti Designer： 与 Modeler 类似，提供流程图可视化设计，但还没有完全支持BPMN规范，可以导入XML格式的文件，进一步设计流程图。</li>
<li>Activiti Explorer： 可以用来管理用户、组、仓库、启动流程、任务办理等。使用REST风格API。</li>
<li>Activiti REST :提供Restful风格的服务，可以使用Json与引擎REST API交互。</li>
</ul>
<p>参考：https://www.yuque.com/torey-4fmbn/hhfum8</p>
</div><div class="post-footer" id="post-footer">
    <div class="post-info">
        <div class="post-info-line">
            <div class="post-info-mod">
                <span>更新于 2020-11-13</span>
            </div>
            <div class="post-info-license"></div>
        </div>
        <div class="post-info-line">
            <div class="post-info-md"><span>
                            <a class="link-to-markdown" href="/activiti%E4%B8%80%E7%AE%80%E4%BB%8B/index.md" target="_blank">阅读原始文档</a>
                        </span></div>
            <div class="post-info-share">
                <span><a href="javascript:void(0);" title="分享到 Twitter" data-sharer="twitter" data-url="https://dou-chi.gitee.io/activiti%E4%B8%80%E7%AE%80%E4%BB%8B/" data-title="Activiti（一）简介" data-hashtags="Activiti"><i class="fab fa-twitter fa-fw"></i></a><a href="javascript:void(0);" title="分享到 Facebook" data-sharer="facebook" data-url="https://dou-chi.gitee.io/activiti%E4%B8%80%E7%AE%80%E4%BB%8B/" data-hashtag="Activiti"><i class="fab fa-facebook-square fa-fw"></i></a><a href="javascript:void(0);" title="分享到 WhatsApp" data-sharer="whatsapp" data-url="https://dou-chi.gitee.io/activiti%E4%B8%80%E7%AE%80%E4%BB%8B/" data-title="Activiti（一）简介" data-web><i class="fab fa-whatsapp fa-fw"></i></a><a href="javascript:void(0);" title="分享到 Line" data-sharer="line" data-url="https://dou-chi.gitee.io/activiti%E4%B8%80%E7%AE%80%E4%BB%8B/" data-title="Activiti（一）简介"><i data-svg-src="/lib/simple-icons/icons/line.min.svg"></i></a><a href="javascript:void(0);" title="分享到 微博" data-sharer="weibo" data-url="https://dou-chi.gitee.io/activiti%E4%B8%80%E7%AE%80%E4%BB%8B/" data-title="Activiti（一）简介"><i class="fab fa-weibo fa-fw"></i></a><a href="javascript:void(0);" title="分享到 Myspace" data-sharer="myspace" data-url="https://dou-chi.gitee.io/activiti%E4%B8%80%E7%AE%80%E4%BB%8B/" data-title="Activiti（一）简介" data-description=""><i data-svg-src="/lib/simple-icons/icons/myspace.min.svg"></i></a><a href="javascript:void(0);" title="分享到 Blogger" data-sharer="blogger" data-url="https://dou-chi.gitee.io/activiti%E4%B8%80%E7%AE%80%E4%BB%8B/" data-title="Activiti（一）简介" data-description=""><i class="fab fa-blogger fa-fw"></i></a><a href="javascript:void(0);" title="分享到 Evernote" data-sharer="evernote" data-url="https://dou-chi.gitee.io/activiti%E4%B8%80%E7%AE%80%E4%BB%8B/" data-title="Activiti（一）简介"><i class="fab fa-evernote fa-fw"></i></a></span>
            </div>
        </div>
    </div>

    <div class="post-info-more">
        <section class="post-tags"><i class="fas fa-tags fa-fw"></i>&nbsp;<a href="/tags/activiti/">Activiti</a></section>
        <section>
            <span><a href="javascript:void(0);" onclick="window.history.back();">返回</a></span>&nbsp;|&nbsp;<span><a href="/">主页</a></span>
        </section>
    </div>

    <div class="post-nav"><a href="/design-patterns-singleton/" class="prev" rel="prev" title="设计模式--单例模式"><i class="fas fa-angle-left fa-fw"></i>设计模式--单例模式</a>
            <a href="/activiti%E4%BA%8C%E5%88%9D%E5%A7%8B%E5%8C%96/" class="next" rel="next" title="Activiti（二）初始化">Activiti（二）初始化<i class="fas fa-angle-right fa-fw"></i></a></div>
</div>
<div id="comments"></div></article></div>
            </main><footer class="footer">
        <div class="footer-container"><div class="footer-line">由 <a href="https://gohugo.io/" target="_blank" rel="noopener noreffer" title="Hugo 0.74.3">Hugo</a> 强力驱动 | 主题 - <a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="noopener noreffer" title="LoveIt 0.2.10"><i class="far fa-kiss-wink-heart fa-fw"></i> LoveIt</a>
                </div><div class="footer-line"><i class="far fa-copyright fa-fw"></i><span itemprop="copyrightYear">2019 - 2021</span><span class="author" itemprop="copyrightHolder">&nbsp;<a href="/" target="_blank">豆是不吃豆豉</a></span></div>
        </div>
    </footer></div>

        <div id="fixed-buttons"><a href="#" id="back-to-top" class="fixed-button" title="回到顶部">
                <i class="fas fa-arrow-up fa-fw"></i>
            </a><a href="#" id="view-comments" class="fixed-button" title="查看评论">
                <i class="fas fa-comment fa-fw"></i>
            </a>
        </div><link rel="stylesheet" href="/lib/katex/katex.min.css"><link rel="stylesheet" href="/lib/katex/copy-tex.min.css"><link rel="stylesheet" href="/lib/cookieconsent/cookieconsent.min.css"><script type="text/javascript" src="/lib/smooth-scroll/smooth-scroll.min.js"></script><script type="text/javascript" src="/lib/autocomplete/autocomplete.min.js"></script><script type="text/javascript" src="/lib/lunr/lunr.min.js"></script><script type="text/javascript" src="/lib/lunr/lunr.stemmer.support.min.js"></script><script type="text/javascript" src="/lib/lunr/lunr.zh.min.js"></script><script type="text/javascript" src="/lib/lazysizes/lazysizes.min.js"></script><script type="text/javascript" src="/lib/clipboard/clipboard.min.js"></script><script type="text/javascript" src="/lib/sharer/sharer.min.js"></script><script type="text/javascript" src="/lib/katex/katex.min.js"></script><script type="text/javascript" src="/lib/katex/auto-render.min.js"></script><script type="text/javascript" src="/lib/katex/copy-tex.min.js"></script><script type="text/javascript" src="/lib/katex/mhchem.min.js"></script><script type="text/javascript" src="/lib/cookieconsent/cookieconsent.min.js"></script><script type="text/javascript">window.config={"code":{"copyTitle":"复制到剪贴板","maxShownLines":100},"comment":{},"cookieconsent":{"content":{"dismiss":"同意","link":"了解更多","message":"本网站使用 Cookies 来改善您的浏览体验."},"enable":true,"palette":{"button":{"background":"#f0f0f0"},"popup":{"background":"#1aa3ff"}},"theme":"edgeless"},"math":{"delimiters":[{"display":true,"left":"$$","right":"$$"},{"display":true,"left":"\\[","right":"\\]"},{"display":false,"left":"$","right":"$"},{"display":false,"left":"\\(","right":"\\)"}],"strict":false},"search":{"highlightTag":"em","lunrIndexURL":"/index.json","lunrLanguageCode":"zh","lunrSegmentitURL":"/lib/lunr/lunr.segmentit.js","maxResultLength":10,"noResultsFound":"没有找到结果","snippetLength":50,"type":"lunr"}};</script><script type="text/javascript" src="/js/theme.min.js"></script></body>
</html>
